<?php

namespace Transform;

class QuestionTransform extends Transform
{
    public function listview()
    {
        return [
            'allows' => ['id', 'title', 'body', 'pics', 'reward', 'is_closed', 'create_time', 'views_count', 'answers_count', 'author', 'close_time', 'human_time', 'likes_count', 'is_like', 'scope'],
            'author' => ['trans' => ['name' => 'User', 'method' => 'pub']],
        ];
    }

    public function detail()
    {
        return [
            'allows' => ['id', 'title', 'body', 'pics', 'reward', 'is_closed', 'create_time', 'views_count', 'answers_count', 'author', 'close_time', 'human_time', 'likes_count', 'is_like', 'scope'],
            'author' => ['trans' => ['name' => 'User', 'method' => 'pub']],
        ];
    }
}
